package com.yunhe.springbootdemo3.controller;

import com.yunhe.springbootdemo3.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

public class AccountController {

    @Autowired
    private AccountService accountService;

    /**
     * 根据id查询用户
     * @param id
     * @return
     */
    @GetMapping("account/{id}")
    public boolean findAccountById(@PathVariable("id") int id){

        boolean bl= accountService.findAccountById(id);

        return bl;
    }

}
